<?php 
namespace app\common\model\user;

use think\Model;

class Users extends Model
{
	/* public function getDepartIdAttr($v)
	{
		return json_decode($v,true);
	} */
	
	public function getEntryTimeAttr($v)
	{
		return date('Y-m-d',$v);
	}
	
	public function getLeaveTimeAttr($v)
	{
		return date('Y-m-d',$v);
	}
	
	public function getStartTimeAttr($v)
	{
		return date('Y-m-d',$v);
	}
	
	public function getEndTimeAttr($v)
	{
		return date('Y-m-d',$v);
	}
	public function getBirthAttr($v)
	{
		return date('Y-m-d',$v);
	}
	public function getHeadImgAttr($v)
	{
		return 'http://'.$_SERVER['HTTP_HOST'].$v;
	}
	public function getIdcardUpAttr($v)
	{
		return $v ? 'http://'.$_SERVER['HTTP_HOST'].$v : $v;
	}
	public function getIdcardDownAttr($v)
	{
		return $v ? 'http://'.$_SERVER['HTTP_HOST'].$v : $v;
	}
	public function getWechatAttr($v)
	{
		return $v ? 'http://'.$_SERVER['HTTP_HOST'].$v : $v;
	}
	public function getAliAttr($v)
	{
		return $v ? 'http://'.$_SERVER['HTTP_HOST'].$v : $v;
	}
}